package jpa.entitys.promis.construction;

import java.io.Serializable;

import javax.persistence.*;

import java.math.BigDecimal;
import java.util.Date;


/**
 * The persistent class for the VW_SYNC_GRN_ITEMS database table.
 * 
 */
@Entity
@Table(name="VW_SYNC_GRN_ITEMS")
@NamedQueries({
    @NamedQuery(name = "VwSyncGrnItem.findAll", query = " SELECT c FROM VwSyncGrnItem c "),
    @NamedQuery(name = "VwSyncGrnItem.findById", query = " SELECT c FROM VwSyncGrnItem c WHERE c.vwGrnItemsId = :Id "),
    @NamedQuery(name = "VwSyncGrnItem.findByPRStatus", query = " SELECT c FROM VwSyncGrnItem c WHERE c.status = :status And c.syncIsstaging = :syncIsstaging "),
    @NamedQuery(name = "VwSyncGrnItem.findByDocumentNo", query = " SELECT c FROM VwSyncGrnItem c WHERE c.company = :company  And  c.project = :project And c.documentNo = :documentNo And c.status = :status And c.syncIsstaging = :syncIsstaging"),
    @NamedQuery(name = "VwSyncGrnItem.findByDocumentItemByUnit", query = " SELECT c FROM VwSyncGrnItem c WHERE c.company = :company  And  c.project = :project And c.documentNo = :documentNo And c.status = :status And c.unitNumber = :unitNumber"),
    @NamedQuery(name = "VwSyncGrnItem.findByDocumentNo1", query = " SELECT c FROM VwSyncGrnItem c WHERE c.company = :company  And  c.project = :project And c.documentNo = :documentNo And c.status = :status ")
})
public class VwSyncGrnItem extends jpa.entitys.common.CommonEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@Column(name="VW_GRN_ITEMS_ID", length=100)
	private String vwGrnItemsId;
	
	@Override public String toString() { return org.apache.commons.lang.builder.ToStringBuilder.reflectionToString(this);}
	
	@Column(name="BUILDING_PHASE", length=30)
	private String buildingPhase;

	@Column(nullable=false, length=2)
	private String company;
	
	@Column(name="PROJECT", nullable=false, length=2)
	private String project;

	@Column(name="CREATED_BY")
	private String createdBy;

	@Column(name="CREATED_BY_NAME", length=4000)
	private String createdByName;

    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="CREATED_ON")
	private Date createdOn;

	@Column(length=3)
	private String currency;

	@Column(name="DOCUMENT_NO", length=4000)
	private String documentNo;

	@Column(name="EXCHANGE_RATE", precision=12, scale=8)
	private BigDecimal exchangeRate;

	@Column(name="EXTERNAL_PO_LINE_ITEM", precision=22)
	private BigDecimal externalPoLineItem;

	@Column(name="EXTERNAL_PO_NO", length=100)
	private String externalPoNo;

	@Column(name="GOODS_RECEIVED_NOTES_ID", length=100)
	private String goodsReceivedNotesId;

    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="GRN_DATE")
	private Date grnDate;

	@Column(name="GRN_NO", nullable=false, precision=6)
	private Long grnNo;

	@Column(name="GRN_SERIES", nullable=false, length=4)
	private String grnSeries;

	@Column(name="GRN_TYPE", nullable=false, length=2)
	private String grnType;

	@Column(name="ITEM_CODE", length=30)
	private String itemCode;

	@Column(name="ITEM_DESC", length=4000)
	private String itemDesc;

	@Column(name="ITEM_UM", length=30)
	private String itemUm;

	@Column(name="ITEM_UM_QTY", precision=22)
	private BigDecimal itemUmQty;

	@Column(name="LAST_UPD_BY")
	private String lastUpdBy;

	@Column(name="LAST_UPD_BY_NAME", length=4000)
	private String lastUpdByName;

    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="LAST_UPD_ON")
	private Date lastUpdOn;

	@Column(name="PO_NO", precision=6)
	private BigDecimal poNo;

	@Column(name="PO_SEQ_NO", precision=22)
	private BigDecimal poSeqNo;

	@Column(name="PO_SERIES", length=4)
	private String poSeries;

	@Column(name="PO_TYPE", length=3)
	private String poType;

	@Column(name="PREPARED_BY", length=30)
	private String preparedBy;

	@Column(name="PREPARED_BY_NAME", length=4000)
	private String preparedByName;

	@Column(length=300)
	private String remarks;

	@Column(name="SAP_COMPANY_CODE", length=4)
	private String sapCompanyCode;

	@Column(name="SAP_PLANT_CODE", length=4)
	private String sapPlantCode;

	@Column(name="SAP_STATUS", length=3)
	private String sapStatus;

	@Column(name="SEQ_NO", precision=22)
	private BigDecimal seqNo;

	@Column(length=1)
	private String status;

	@Column(name="SUPPLIER_CODE", length=30)
	private String supplierCode;

    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="SUPPLIER_DO_DATE")
	private Date supplierDoDate;

	@Column(name="SUPPLIER_DO_NO", length=30)
	private String supplierDoNo;

	@Column(name="SYNC_CREATEDBY", length=100)
	private String syncCreatedby;

    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="SYNC_CREATEDON")
	private Date syncCreatedon;

	@Column(name="SYNC_EXTERNAL_REF_KEY", length=100)
	private String syncExternalRefKey;

	@Column(name="SYNC_EXTERNAL_REF_NO", length=100)
	private String syncExternalRefNo;

	@Column(name="SYNC_ISSTAGING", length=1)
	private String syncIsstaging;

	@Column(name="SYNC_ISSYNC", length=1)
	private String syncIssync;

	@Column(name="SYNC_UPDATEDBY", length=100)
	private String syncUpdatedby;

    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="SYNC_UPDATEDON")
	private Date syncUpdatedon;

	@Column(name="UNIT_NUMBER", length=30)
	private String unitNumber;

	@Column(name="ZONE_CODE", length=30)
	private String zoneCode;

    /**
	 * @return the project
	 */
	public String getProject() {
		return project;
	}

	/**
	 * @param project the project to set
	 */
	public void setProject(String project) {
		this.project = project;
	}

	public VwSyncGrnItem() {
    }

	public String getBuildingPhase() {
		return this.buildingPhase;
	}

	public void setBuildingPhase(String buildingPhase) {
		this.buildingPhase = buildingPhase;
	}

	public String getCompany() {
		return this.company;
	}

	public void setCompany(String company) {
		this.company = company;
	}

	public String getCreatedBy() {
		return this.createdBy;
	}

	public void setCreatedBy(String createdBy) {
		this.createdBy = createdBy;
	}

	public String getCreatedByName() {
		return this.createdByName;
	}

	public void setCreatedByName(String createdByName) {
		this.createdByName = createdByName;
	}

	public Date getCreatedOn() {
		return this.createdOn;
	}

	public void setCreatedOn(Date createdOn) {
		this.createdOn = createdOn;
	}

	public String getCurrency() {
		return this.currency;
	}

	public void setCurrency(String currency) {
		this.currency = currency;
	}

	public String getDocumentNo() {
		return this.documentNo;
	}

	public void setDocumentNo(String documentNo) {
		this.documentNo = documentNo;
	}

	public BigDecimal getExchangeRate() {
		return this.exchangeRate;
	}

	public void setExchangeRate(BigDecimal exchangeRate) {
		this.exchangeRate = exchangeRate;
	}

	public BigDecimal getExternalPoLineItem() {
		return this.externalPoLineItem;
	}

	public void setExternalPoLineItem(BigDecimal externalPoLineItem) {
		this.externalPoLineItem = externalPoLineItem;
	}

	public String getExternalPoNo() {
		return this.externalPoNo;
	}

	public void setExternalPoNo(String externalPoNo) {
		this.externalPoNo = externalPoNo;
	}

	public String getGoodsReceivedNotesId() {
		return this.goodsReceivedNotesId;
	}

	public void setGoodsReceivedNotesId(String goodsReceivedNotesId) {
		this.goodsReceivedNotesId = goodsReceivedNotesId;
	}

	public Date getGrnDate() {
		return this.grnDate;
	}

	public void setGrnDate(Date grnDate) {
		this.grnDate = grnDate;
	}

	public Long getGrnNo() {
		return this.grnNo;
	}

	public void setGrnNo(Long grnNo) {
		this.grnNo = grnNo;
	}

	public String getGrnSeries() {
		return this.grnSeries;
	}

	public void setGrnSeries(String grnSeries) {
		this.grnSeries = grnSeries;
	}

	public String getGrnType() {
		return this.grnType;
	}

	public void setGrnType(String grnType) {
		this.grnType = grnType;
	}

	public String getItemCode() {
		return this.itemCode;
	}

	public void setItemCode(String itemCode) {
		this.itemCode = itemCode;
	}

	public String getItemDesc() {
		return this.itemDesc;
	}

	public void setItemDesc(String itemDesc) {
		this.itemDesc = itemDesc;
	}

	public String getItemUm() {
		return this.itemUm;
	}

	public void setItemUm(String itemUm) {
		this.itemUm = itemUm;
	}

	public BigDecimal getItemUmQty() {
		return this.itemUmQty;
	}

	public void setItemUmQty(BigDecimal itemUmQty) {
		this.itemUmQty = itemUmQty;
	}

	public String getLastUpdBy() {
		return this.lastUpdBy;
	}

	public void setLastUpdBy(String lastUpdBy) {
		this.lastUpdBy = lastUpdBy;
	}

	public String getLastUpdByName() {
		return this.lastUpdByName;
	}

	public void setLastUpdByName(String lastUpdByName) {
		this.lastUpdByName = lastUpdByName;
	}

	public Date getLastUpdOn() {
		return this.lastUpdOn;
	}

	public void setLastUpdOn(Date lastUpdOn) {
		this.lastUpdOn = lastUpdOn;
	}

	public BigDecimal getPoNo() {
		return this.poNo;
	}

	public void setPoNo(BigDecimal poNo) {
		this.poNo = poNo;
	}

	public BigDecimal getPoSeqNo() {
		return this.poSeqNo;
	}

	public void setPoSeqNo(BigDecimal poSeqNo) {
		this.poSeqNo = poSeqNo;
	}

	public String getPoSeries() {
		return this.poSeries;
	}

	public void setPoSeries(String poSeries) {
		this.poSeries = poSeries;
	}

	public String getPoType() {
		return this.poType;
	}

	public void setPoType(String poType) {
		this.poType = poType;
	}

	public String getPreparedBy() {
		return this.preparedBy;
	}

	public void setPreparedBy(String preparedBy) {
		this.preparedBy = preparedBy;
	}

	public String getPreparedByName() {
		return this.preparedByName;
	}

	public void setPreparedByName(String preparedByName) {
		this.preparedByName = preparedByName;
	}

	public String getRemarks() {
		return this.remarks;
	}

	public void setRemarks(String remarks) {
		this.remarks = remarks;
	}

	public String getSapCompanyCode() {
		return this.sapCompanyCode;
	}

	public void setSapCompanyCode(String sapCompanyCode) {
		this.sapCompanyCode = sapCompanyCode;
	}

	public String getSapPlantCode() {
		return this.sapPlantCode;
	}

	public void setSapPlantCode(String sapPlantCode) {
		this.sapPlantCode = sapPlantCode;
	}

	public String getSapStatus() {
		return this.sapStatus;
	}

	public void setSapStatus(String sapStatus) {
		this.sapStatus = sapStatus;
	}

	public BigDecimal getSeqNo() {
		return this.seqNo;
	}

	public void setSeqNo(BigDecimal seqNo) {
		this.seqNo = seqNo;
	}

	public String getStatus() {
		return this.status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getSupplierCode() {
		return this.supplierCode;
	}

	public void setSupplierCode(String supplierCode) {
		this.supplierCode = supplierCode;
	}

	public Date getSupplierDoDate() {
		return this.supplierDoDate;
	}

	public void setSupplierDoDate(Date supplierDoDate) {
		this.supplierDoDate = supplierDoDate;
	}

	public String getSupplierDoNo() {
		return this.supplierDoNo;
	}

	public void setSupplierDoNo(String supplierDoNo) {
		this.supplierDoNo = supplierDoNo;
	}

	public String getSyncCreatedby() {
		return this.syncCreatedby;
	}

	public void setSyncCreatedby(String syncCreatedby) {
		this.syncCreatedby = syncCreatedby;
	}

	public Date getSyncCreatedon() {
		return this.syncCreatedon;
	}

	public void setSyncCreatedon(Date syncCreatedon) {
		this.syncCreatedon = syncCreatedon;
	}

	public String getSyncExternalRefKey() {
		return this.syncExternalRefKey;
	}

	public void setSyncExternalRefKey(String syncExternalRefKey) {
		this.syncExternalRefKey = syncExternalRefKey;
	}

	public String getSyncExternalRefNo() {
		return this.syncExternalRefNo;
	}

	public void setSyncExternalRefNo(String syncExternalRefNo) {
		this.syncExternalRefNo = syncExternalRefNo;
	}

	public String getSyncIsstaging() {
		return this.syncIsstaging;
	}

	public void setSyncIsstaging(String syncIsstaging) {
		this.syncIsstaging = syncIsstaging;
	}

	public String getSyncIssync() {
		return this.syncIssync;
	}

	public void setSyncIssync(String syncIssync) {
		this.syncIssync = syncIssync;
	}

	public String getSyncUpdatedby() {
		return this.syncUpdatedby;
	}

	public void setSyncUpdatedby(String syncUpdatedby) {
		this.syncUpdatedby = syncUpdatedby;
	}

	public Date getSyncUpdatedon() {
		return this.syncUpdatedon;
	}

	public void setSyncUpdatedon(Date syncUpdatedon) {
		this.syncUpdatedon = syncUpdatedon;
	}

	public String getUnitNumber() {
		return this.unitNumber;
	}

	public void setUnitNumber(String unitNumber) {
		this.unitNumber = unitNumber;
	}

	public String getVwGrnItemsId() {
		return this.vwGrnItemsId;
	}

	public void setVwGrnItemsId(String vwGrnItemsId) {
		this.vwGrnItemsId = vwGrnItemsId;
	}

	public String getZoneCode() {
		return this.zoneCode;
	}

	public void setZoneCode(String zoneCode) {
		this.zoneCode = zoneCode;
	}

}